#include "AppFrameLib.h"

PVOID periodTask(PVOID          pvTaskArg,                              /* �������                     */
                 PVOID          pvEvent,                                /* �¼�ָ��                     */
                 PUCHAR         pucData,                                /* �¼�����                     */
                 INT32          iLen)                                   /* �¼����ݳ���                 */
{
    printf("period Task run...\n");

    return (NULL);
}


int main (int argc, char **argv)
{
    __TASK_CFG          stTaskCfg;
    PVOID               pvTask;
    __EVENT_TIMER_START stTimerStart;


    BQ_appFrameInit();

    stTaskCfg.fTask  = periodTask;
    stTaskCfg.pvArg  = NULL;                                            /* ���ô��������ĵ�һ������     */
    stTaskCfg.uiPrio = 240;
    pvTask = BQ_taskOpen("periodTask", __TASK_TYPE_PERIODEVENT, (PVOID)&stTaskCfg);

    stTimerStart.uiFirst  = 1000;                                       /* ���õ�һ�δ���ʱ��           */
    stTimerStart.uiPeriod = 1000;                                       /* ��������                     */
    stTimerStart.uiTimes  = 0;                                          /* ���޴���                     */
    BQ_taskCtrl(pvTask, __TASK_CMD_STARTPERIOD, (PVOID)&stTimerStart);  /* ��ʼ��������                 */

    sleep(10);
    BQ_taskCtrl(pvTask, __TASK_CMD_STOPPERIOD, NULL);                   /* ֹͣ��������                 */

    return  (0);
}
